from django.contrib import admin
from instance.models import StorageInstance, DBInstance


@admin.register(StorageInstance)
class StorageInstanceAdmin(admin.ModelAdmin):
    def save_model(self, request, obj, form, change):
        obj.save(create_uid=request.user.id)


@admin.register(DBInstance)
class DBInstanceAdmin(admin.ModelAdmin):
    def save_model(self, request, obj, form, change):
        obj.save(create_uid=request.user.id)
